﻿using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using Glorysoft.Auto.Xfw;
using Glorysoft.EAP.Core.Entities;
using Glorysoft.EAP.Core.Entities.EMS.EAP;
using Glorysoft.EAP.Core.Entities.Odyssey;

namespace Glorysoft.EAP.Core
{
    public class Dict
    {
        #region 单例对象定义
        private static readonly Lazy<Dict> Lazy = new Lazy<Dict>(() => new Dict());
        public static Dict Current => Lazy.Value;
        private Dict()
        {
        }
        #endregion

        public Dictionary<string, ProcessMonitor> PMDic = new Dictionary<string, ProcessMonitor>();
        public Dictionary<string, ProcessMonitor> PPDic = new Dictionary<string, ProcessMonitor>();
        public Dictionary<string, ProcessMonitor> MsgDic = new Dictionary<string, ProcessMonitor>();
        public List<EqpParameters> EqpParaList = new List<EqpParameters>();
        public List<EqpInfoResponse> EqpInfoList = new List<EqpInfoResponse>();
        public Dictionary<string, ContextObject> EqpConfigDic = new Dictionary<string, ContextObject>();
        public List<string> FirstDatacollectList = new List<string>();
        public ConcurrentDictionary<string, bool> SecsEqpIsAlarmList = new ConcurrentDictionary<string, bool>();
        public Dictionary<string, TestInfo> TestInfoDic = new Dictionary<string, TestInfo>();//收集出站数据
        public LotInfo lotInfo = new LotInfo();
        public Dictionary<string, bool> NeedleResult = new Dictionary<string, bool>();  //对针结果
        public Dictionary<string, string> OCRCurrentStatus = new Dictionary<string, string>();  //OCR当前状态  prober id, status
        public Dictionary<string, int> LotOutNum = new Dictionary<string, int>();  //批次出站剩余次数
        public Dictionary<string, LotInfo> TrackOutLotQueue = new Dictionary<string, LotInfo>();  //等待出站的Lot队列
        public string RCMName = "";
        public string OCRName = "";
        public string DaemonName = "";
        public string ProberRunStatus = "0";  //Prober测试状态 0=未测试  1=测试中
        public string DaemonConnStatus = "0";  //Daemon 通讯状态
        public string OCRConnStatus = "-1";   //OCR 通讯状态
        public string RCMConnStatus = "-1";   //RCM 通讯状态
        public string TesterID = "";   //TesterID
        public string TesterRunStatus = "0";    //Prober测试状态 0=未测试  1=测试中
        public string CurState = "1";
        public RunMode EAPRunMode = RunMode.AutomaticOperation; //EAP自动作业&手动作业切换标志
        public string Interval = "60";   //Daemon心跳监控时间
        public string IsEngineeringMode = "N";   // 是否为工程测试模式
        public string ProberRecipe = "";   // 工程测试模式下的 Prober Recipe
        public string ProberLotID = "";   // 工程测试模式下的 Prober LotID
        public string DataSource = "";   //MSACCESS_DB
        public string SharePath = "";   //shareDB
        public string LocalPath = "";   //local_DB
        public string PreState = "";   //  设备上一状态
        public string TesterType = "";   //TesterType
        public string OCRTesterConnStatus = "-1";   //OCR Tester 通讯状态
        public string EAPName = "-1";   //OCR Tester 通讯状态
        public string EAPDB = AppDomain.CurrentDomain.BaseDirectory + "SqliteDB\\EAPDB.db";
        public string LotOutTime = "5";   //多长时间发送一次TrackOut给MES（分钟）
        public string LotOutCount = "3";   //每个批次只能发送的次数
        public string LotOutInfoPath = "";   //出站测试数据路径
        public string OdysseyIP = "";   //MSACCESS_DB
        public string MonitorTestDataPath = "";   //MMonitorTestDataPath    
        public string RunMonitorRemindWeek = "";
        public string RunMonitorRemindHour = "";
        public string RunMonitorLotId = "";
        public string RunMonitorRecipeId = "";
        public string EQPType = ""; // Eqp type
        public int  Qty; //mes批次的总数量
        public string AlarmID = "";// eap 报警状态
        public string RemindMessage="";
        public string RecommendOD = "";
        public parameterSet parameterSet = new parameterSet();
    }
}
